﻿@using System.Linq
@model MrCMS.Entities.Documents.Web.FormProperties.FormPropertyWithOptions

@if (Model.Options.Any())
{
    <table class="table table-condensed table-striped table-bordered">
        <thead>
            <tr>
                <th>@Resource("Value")</th>
                <th>@Resource("Admin Webpage Form Option Selected", "Selected")</th>
                <th>@Resource("Actions")</th>
            </tr>
        </thead>
        <tbody>

            @foreach (var option in Model.Options)
            {
                <tr>
                    <td>@option.Value</td>
                    <td>@option.Selected</td>
                    <td>
                        <div class="btn-group">
                            @Html.ActionLink(Resource("Edit"), "EditOption", "Form", new { id = option.Id }, new { @class = "btn btn-xs btn-default", data_toggle = "fb-modal" })
                            @Html.ActionLink(Resource("Delete"), "DeleteOption", "Form", new { id = option.Id }, new { @class = "btn btn-xs btn-danger", data_toggle = "fb-modal" })
                        </div>
                    </td>
                </tr>
            }

        </tbody>
    </table>
}
else
{
    @Resource("Admin Webpage From Options None", "Please click add option to add your first option to this field.")
}
<br />
<div class="btn-group">
    @Html.ActionLink("Add Option", "AddOption", "Form", new { id = Model.Id }, new { @class = "btn btn-xs btn-primary", data_toggle = "fb-modal" })
</div>


